﻿<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>录入快递</title>
    <link rel="stylesheet" type="text/css" href="/CMS/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/CMS/css/express.css"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/DefaultSkin.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/load.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/control.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/list.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/anim.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/page.css?v=1.0"/><!-- 这个里面有字体,加个版本号不进行更新 -->
    <link rel="stylesheet" type="text/css" href="/IMS/css/comm.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/select2/select2.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/zTreeStyle/zTreeStyle.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/core.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/file/uploadify/uploadify.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/treeview/jquery.treeview.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/multi-select.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/js/plugins/bsgrid/bsgrid.all.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jeasy-ui/easyui.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css"
          href="/IMS/js/plugins/poshytip/tip-darkgray/tip-darkgray.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/addinfo.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/prettyPhoto.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jquery-ui-1.10.4.custom.min.css?v=20180712190507493"/>
    <link rel="stylesheet" type="text/css" href="/IMS/css/jquery.editable-select.min.css?v=20180712190507493"/>
    <script type="text/javascript" src="/IMS/js/jquery-1.11.2.min.js?v=20180712190507542"></script>
    <!-- 新增加 -->
    <script type="text/javascript" src="/IMS/js/plugins/comm/jquery-ajax.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/securityProtect.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/comm/jquery-ajax-response-handler.js?v=20180712190507542"></script>
    <!-- 新增加 END -->
    <script type="text/javascript" src="/IMS/js/common/public-obj.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/bind.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/controls.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/slide.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/switch.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/initial.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/print/printhtml.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/listBox.js?v=20180712190507542"></script>

    <script type="text/javascript" src="/IMS/js/plugins/My97DatePicker/WdatePicker.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/file/uploadify/jquery.uploadify.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/layer/layer.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/select2/select2.full.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/select2/i18n/zh-CN.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/treeview/jquery.treeview.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/form/jquery.form.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.core-3.5.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/ztree/jquery.ztree.excheck-3.5.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/constant.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/common.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/bmsAjax.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/comm/validata.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/validate/jquery.validate.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/plugins/validate/localization/messages_zh.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/validate/regValidate.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/popup_layer.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/jqueryPlugins/jquery_magnifier.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.multi-select.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.quicksearch.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/jquery.easyui.min.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.prettyPhoto.js?v=20180712190507542"></script>

    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.zh-CN.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/bsgrid.all.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/bsgrid/grid.extend.min.js?v=20180712190507542"></script>
    <script type="text/javascript" charset="UTF-8"
            src="/IMS/js/plugins/poshytip/jquery.poshytip.js?v=20180712190507542"></script>

    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery-ui-1.10.4.custom.min.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/common/joinUs/AddListBox.js?v=20180712190507542"></script>
    <script type="text/javascript"
            src="/IMS/js/common/jqueryPlugins/jquery.editable-select.min.js?v=20180712190507542"></script>

    <!-- echarts -->
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/echarts.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/bar.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/line.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/pie.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/IMS/js/plugins/echarts/dist/chart/funnel.js?v=20180712190507542"></script>
    <script type="text/javascript" src="/CMS/js/express/index.js"></script>
    <script type="text/javascript" src="/CMS/js/express/bootstrap.min.js"></script>
    <!-- 评价JS -->
    <link rel="stylesheet" type="text/css" href="/CMS/css/star-rating.css"/>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <script type="text/javascript" src="/CMS/js/express/star-rating.js"></script>
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
    <!-- bootstrap -->
</head>

<body>
<div class="list-table icip_content_box">
    <div>
        <div class="icip_title_box" style="margin-bottom: 20px;">
            <div class="left">
                <span class="icip_title_text" style="margin-left: 20px;">报修详情</span>
                <span class="icip_button">
				<a href="/CMS/repiarInfo/showList.ht">返回上级</a>
			</span>
            </div>

        </div>
    </div>
    <ul id="myTab" class="nav nav-tabs">
        <li class="active">
            <a href="#home" data-toggle="tab">
                基本信息
            </a>
        </li>
        <li><a href="#ytc" data-toggle="tab">维修进度</a></li>
        <li><a href="#ejb" data-toggle="tab">评价</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
        <div class="tab-pane fade in active" id="home">
            <div id="basic">

            </div>
        </div>
        <div class="tab-pane fade" id="ytc">
            <div id="jindu">

            </div>
            <div id="schemeone">

            </div>
            <div id="schemetwo">

            </div>
        </div>
        <div class="tab-pane fade" id="ejb">

            <img class="star1 star" src="/CMS/css/img/star/star1.jpg"/>
            <img class="star2 star" src="/CMS/css/img/star/star2.jpg"/>
            <img class="star3 star" src="/CMS/css/img/star/star3.jpg"/>
            <img class="star4 star" src="/CMS/css/img/star/star4.jpg"/>
            <img class="star5 star" src="/CMS/css/img/star/star5.jpg"/>
            <img class="star6 star" src="/CMS/css/img/star/star6.jpg"/>
            <img class="star7 star" src="/CMS/css/img/star/star7.jpg"/>
            <img class="star8 star" src="/CMS/css/img/star/star8.jpg"/>
            <img class="star9 star" src="/CMS/css/img/star/star9.jpg"/>
            <img class="star10 star" src="/CMS/css/img/star/star10.jpg"/>
            <div id="pingjia">

            </div>
        </div>

    </div>
</div>
</div>
</body>

<script type="text/javascript">

    $(function () {
        //获取url中的参数
        function getUrlParam(name) {
            // console.log($("iframe"));
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)")
            var url = $(window.parent.document).find("iframe").contents().find("html").attr("uri");
            var index = url.lastIndexOf("?");
            url = url.substring(index + 1, url.length);
            var index = url.lastIndexOf("=");
            url = url.substring(index + 1, url.length);
            // console.log(url)
            return url;
        }

        //接收URL中的参数strRId
        var id = getUrlParam('strRId');
        // console.log('strRId:' + id);
        $.ajax({
            url: '/CMS/repiarInfo/detail.ht',
            type: 'get',
            data: {
                "strRId": id
            },
            dataType: 'json',
            success: function (data) {
                // console.log(data)
                $("#basic").html("");
                $("#jindu").html("");
                $("#schemeone").html("");
                $("#schemetwo").html("");
                $.each(data.data, function (index, item) {
                    //保修基本详情
                    var basic;
                    basic = '<li>' + '报修类型：' + item.strTypeName + '</li>' +
                        '<li>' + '报修项目：' + item.strProject + '</li>' +
                        '<li>' + '联系人：' + item.strUserName + '</li>' +
                        '<li>' + '电话：' + item.strPhone + '</li>' +
                        '<li>' + '上报时间：' + item.strRtime + '</li>' +
                        '<li class="Status">' + '</li>' +
                        '<li>' + '内容：' + item.strContent + '</li>' +
                        '<li style="border:0;">' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strImg01 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strImg02 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strImg03 + '>' +
                        '</li>';
                    $("#basic").append('<ul>' + basic + '</ul>');
                    var strStu = item.strStatus;
                    if (strStu == 1) {
                        $(".Status").text("状态：已接单");
                    } else if (strStu == 2) {
                        $(".Status").text("状态：已处理");
                    } else if (strStu == 3) {
                        $(".Status").text("状态：已完成");
                    } else if (strStu == -1) {
                        $(".Status").text("状态：业主已上报");
                    }
                    //维修进度1
                    var schedule;
                    schedule = '<li>' + '维修状态：' + item.strRepire[0].strWstatus + '</li>' +
                        '<li>' + '维修内容：' + item.strRepire[0].strContent + '</li>' +
                        '<li>' + '材料费：￥' + item.strRepire[0].strMaterialsCharge + '</li>' +
                        '<li>' + '服务费：￥' + item.strRepire[0].strServeCharge + '</li>' +
                        '<li>' + '时间：' + item.strRepire[0].strWtime + '</li>' +
                        '<li>' + '服务人：' + item.strRepire[0].streName + '</li>' +
                        '<li>' + '手机：' + item.strRepire[0].strPhone + '</li>' +
                        '<li style="border:0;">' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[0].strImg01 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[0].strImg02 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[0].strImg03 + '>' +
                        '</li>';
                    $("#jindu").append('<ul>' + schedule + '</ul>');
                    //维修进度2
                    var schemeone;
                    schemeone = '<li>' + '维修状态：' + item.strRepire[1].strWstatus + '</li>' +
                        '<li>' + '维修内容：' + item.strRepire[1].strContent + '</li>' +
                        '<li>' + '材料费：￥' + item.strRepire[1].strMaterialsCharge + '</li>' +
                        '<li>' + '服务费：￥' + item.strRepire[1].strServeCharge + '</li>' +
                        '<li>' + '时间：' + item.strRepire[1].strWtime + '</li>' +
                        '<li>' + '服务人：' + item.strRepire[1].streName + '</li>' +
                        '<li>' + '手机：' + item.strRepire[1].strPhone + '</li>' +
                        '<li style="border:0;">' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[1].strImg01 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[1].strImg02 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin: 0 5px;" src=' + item
                            .strRepire[1].strImg03 + '>' +
                        '</li>';
                    $("#schemeone").append('<ul>' + schemeone + '</ul>');
                    //维修进度3
                    var schemetwo;
                    schemetwo = '<li>' + '维修状态：' + item.strRepire[2].strWstatus + '</li>' +
                        '<li>' + '维修内容：' + item.strRepire[2].strContent + '</li>' +
                        '<li>' + '材料费：￥' + item.strRepire[2].strMaterialsCharge + '</li>' +
                        '<li>' + '服务费：￥' + item.strRepire[2].strServeCharge + '</li>' +
                        '<li>' + '时间：' + item.strRepire[2].strWtime + '</li>' +
                        '<li>' + '服务人：' + item.strRepire[2].streName + '</li>' +
                        '<li>' + '手机：' + item.strRepire[2].strPhone + '</li>' +
                        '<li style="border:0;">' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strRepire[2].strImg01 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strRepire[2].strImg02 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strRepire[2].strImg03 + '>' +
                        '</li>';
                    $("#schemetwo").append('<ul>' + schemetwo + '</ul>');
                });
            }
        })
        $.ajax({
            url: '/CMS/repiarInfo/detail.ht',
            type: 'get',
            data: {
                "strRId": id
            },
            dataType: 'json',
            success: function (data) {
                //console.log(data)
                $("#pingjia").html("");
                $.each(data.data, function (index, item) {
                    //评价
                    var appraise;
                    appraise =
                        '<li>' + '评价内容：' + item.strComment[0].strContent + '</li>' +
                        '<li style="border:0;">' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strComment[0].strImg01 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strComment[0].strImg02 + '>' +
                        '<img onerror="this.style.display=\'none\';" style="width:150px;height:150px;margin-right: 20px;" src=' +
                        item.strComment[0].strImg03 + '>' +
                        '</li>';
                    $("#pingjia").append('<ul>' + appraise + '</ul>');
                    //获取到评价，在页面显示评价星级
                    var starw = item.strComment[0].strStartnum;
                    //$("#input-21d").val(parseInt(item.strComment[0].strStartnum));
                    if (starw == 0) {
                        $(".tab-pane .star").css("display", "block")
                    }
                    if (starw == 0.5) {
                        $(".star1").css("display", "block")
                    }
                    if (starw == 1) {
                        $(".star2").css("display", "block")
                    }
                    if (starw == 1.5) {
                        $(".star3").css("display", "block")
                    }
                    if (starw == 2) {
                        $(".star4").css("display", "block")
                    }
                    if (starw == 2.5) {
                        $(".star5").css("display", "block")
                    }
                    if (starw == 3) {
                        $(".star6").css("display", "block")
                    }
                    if (starw == 3.5) {
                        $(".star7").css("display", "block")
                    }
                    if (starw == 4) {
                        $(".star8").css("display", "block")
                    }
                    if (starw == 4.5) {
                        $(".star9").css("display", "block")
                    }
                    if (starw == 5) {
                        $(".star10").css("display", "block")
                    }
                   // console.log(starw)

                });
            }
        })

    });

</script>
</html>









